import lejos.nxt.Button;

/**
 * Simple template for controlling a NXT brick with leJOS firmware
 * http://lejos.sourceforge.net
 * 
 * @author sven.tiffe@googlemail.com
 */

public class LeJOSMain {

    public static void main(String[] args) throws InterruptedException {
		
		// add startup code here
		<...>
		
		// main program loop, exit when user presses ESCAPE on NXT brick
		while (true) {
			// add robot logic here
			<...>
			
			if (Button.ESCAPE.isDown()) {
				break;
			}
		}
		
		// add shutdown code here
		<...>
	}
}

